<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=11,IE=10,IE=9,IE=8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
        <meta name="apple-mobile-web-app-title" content="/mode">
        <meta http-equiv="Cache-Control" content="no-siteapp">
        <title>{:site_cache('title')}</title>
        <meta name="keywords" content="{:site_cache('keywords')}">
        <meta name="description" content="{:site_cache('description')}">
        <link rel="shortcut icon" href="{:site_template_cache('favicon')}">
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{:site_template_cache('apple_favicon')}">
        <meta name="robots" content="noindex,follow">
        <link rel="stylesheet" href="/mode/static/css/bootstrap.css" type="text/css" media="screen">
        <link rel="stylesheet" href="/mode/static/css/font-awesome.min.css" type="text/css" media="screen">
        <link rel="stylesheet" href="/mode/static/css/style.css" type="text/css" media="screen">
        <script type="text/javascript" src="/mode/static/js/jquery.min.js"></script>
        <!--[if lt IE 9]><script src="/mode/static/js/html5.min.js"></script><![endif]-->
    </head>
    <body class="home blog mobantu ahead sidebar-right">
        <header class="header">

        <div class="container">
            <h1 class="logo"><a href="/" title="{:site_cache('title')}" style="background-image:url('{:imageUrl(site_cache('logo'),117,32)}')">{:site_cache('title')}</a></h1>
            <ul class="site-nav site-navbar">
                <li class="menu-item <?php if($controller_name =="index") echo 'current-menu-item'; ?>"><a href="/">首页</a></li>
                <?php $menuList = site_cache('','menu'); ?>
                <?php foreach($menuList as $value): ?>
                <?php if($value['type'] == 1): ?>
                <li class="menu-item <?php if($controller_name == 'category' && $cid == $value['value']) echo 'current-menu-item'; ?>"><a href="/category/{$value.value}">{$value.title}</a></li>
                <?php endif; ?>
                <?php if($value['type'] == 2): ?>
                <li class="menu-item <?php if($controller_name == 'tag' && $tagid == $value['value']) echo 'current-menu-item'; ?>"> <a href="/tag/{$value.value}">{$value.title}</a> </li>
                <?php endif; ?>
                <?php if($value['type'] == 3): ?>
                <li class="menu-item <?php if($controller_name == 'page' && $pageid == $value['value']) echo 'current-menu-item'; ?>"> <a href="/page/{$value.value}">{$value.title}</a> </li>
                <?php endif; ?>
                <?php if($value['type'] == 4): ?>
                <li class="menu-item"><a href="{$value.value}" target="_blank">{$value.title}</a></li>
                <?php endif; ?>
                <?php endforeach; ?>
            </ul>
            <ul class="nav-right">
                <li class="navto-search"><a href="javascript:;" class="search-show active"><i class="fa fa-search"></i></a></li>
            </ul>
            <i class="fa fa-bars m-icon-nav"></i>
            <i class="fa fa-search m-icon-nav m-nav-search"></i>
            <i class="fa fa-user m-icon-nav signin-loader"></i>
        </div>

        </header>
        <div class="site-search">
            <div class="container">
                <form method="get" class="site-search-form" action="/search">
                    <input class="search-input" name="keyword" type="text" placeholder="搜索一下">
                    <button class="search-btn" type="submit"><i class="fa fa-search"></i></button>
                </form>
            </div>
        </div>
